<title>首页用户栏目内容基本信息</title>
<script type="text/html" template>
<form class="layui-form"  requrl="{{ serverPath.systemPath + layui.setter.sysLinkPath}}sysUserColumnRes/get"style="padding: 0px 30px;width: 440px;text-align: center;margin-left: auto;margin-right: auto" lay-filter="sysUserColumnResDataForm">

    <div style="margin: 15px 0px;height: 471px;overflow: auto;">
        <input type="txt" name="userColResId" class="userColResId" fieldname="userColResId" hidden />

        <div class="layui-form-item">
            <label class="layui-form-label">主键</label>
            <div class="layui-input-block">
                <input type="text" name="userColResId"  placeholder="请输入主键"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="userColResId">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">栏目id</label>
            <div class="layui-input-block">
                <input type="text" name="columnid"  placeholder="请输入栏目id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="columnid">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户id</label>
            <div class="layui-input-block">
                <input type="text" name="userid"  placeholder="请输入用户id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="userid">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">资源id</label>
            <div class="layui-input-block">
                <input type="text" name="resid"  placeholder="请输入资源id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="resid">
            </div>
        </div>
    </div>

    <div class="layui-form-item" style="margin-right: 110px">
        <div class="layui-input-block">
            <a lay-submit lay-filter="sysUserColumnRes" class="layui-btn btn-n" requrl="{{serverPath.systemPath + layui.setter.sysLinkPath}}sysUserColumnRes/save">立即提交</a>
            <button type="reset" id="closeWindow" class="layui-btn btn-n layui-btn-danger btn-save">取消</button>
        </div>
    </div>
</form>
</script>
<script>

    layui.use(['common','laydate'], function () {
        var laydate = layui.laydate;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for(var i=0;i<dateTimeFiledLen.length;i++){
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                ,type: 'datetime'
            });
        }

        //关闭当前页面
        $("#closeWindow").click(function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        })

        var common = layui.common;
        common.updateForm({
            name:'sysUserColumnResDataForm',
            idValue:"${userColResId}",
            primary:"userColResId",
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    window.parent.layer.alert(data.msg, function() {
                        window.parent.layer.close(window.parent.index);
                        if(window.parent.parent.layui.index){
                            window.parent.parent.layui.index.render();
                        }else{
                            parent.location.reload();
                        }
                    });
                } else {
                    window.parent.layer.alert(data.msg);
                }
                return false;
            }
        });
    });
</script>
